{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 敌人攻击玩家，玩家血量减少"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 编辑行为树EnemyBehaviorTree\n",
    "新建任务 选BTTask_BlueprintBase,改名为DoAttackTask\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0011_1.png)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 在DoAttackTask中添加变量Target、Damage\n",
    "都设置为公有变量\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0011_2.png)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 变量Target\n",
    "Target变量类型选Blackboard Key Selector\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0011_2_1.png)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 变量Damage\n",
    "Target变量类型为Float，默认值0.3，代表每次攻击的伤害值\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0011_2_2.png)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 编辑任务DoAttackTask的事件图表\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0011_3.png)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 编辑行为树EnemyBehaviorTree\n",
    "添加任务DoAttackTask\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0011_4.png)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 编辑DoAttackTask默认值\n",
    "\n",
    "Target设为Player\n",
    "Damage为默认的0.3\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0011_5.png)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 编辑蓝图FirstPersonCharacter\n",
    "添加事件AnyDanage\n",
    "![image.png](https://gitee.com/lhqer/cplusplus_junior_teacher/raw/master/img/UE4/BP/0011_6.png)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
